cmake_minimum_required(VERSION 2.6)
#project(pcm2freq)

set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Cmake/modules )
set( CMAKE_BUILD_TYPE relWithDebInfo )

set(CMAKE_VERBOSE_MAKEFILE ON)
message(STATUS "System: " ${CMAKE_SYSTEM_NAME} " " ${CMAKE_SYSTEM_VERSION})
message(STATUS "Processor: " ${CMAKE_HOST_SYSTEM_PROCESSOR})

if(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
  if(MSVC)
    message(STATUS "Compiler: MSVC, version: " ${MSVC_VERSION})
  endif(MSVC)
else(${CMAKE_SYSTEM_NAME} STREQUAL Linux) 
  message(STATUS "Only GCC is supported on Linux")
endif(${CMAKE_SYSTEM_NAME} STREQUAL Windows) 


##
## Boost
##
if(WIN32)
	# If BOOST_ROOT was defined in the environment, use it.
	if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "")
		set(BOOST_ROOT $ENV{BOOST_ROOT})
	endif(NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "")
endif(WIN32)

find_package(Boost)
if(NOT Boost_FOUND)
	message(FATAL_ERROR "boost not found. Install it or specify path to it with -DBOOST_INCLUDEDIR=<boost path> (and if it is nesasary -DBOOST_LIBRARYDIR=<boost libs path>)")
endif(NOT Boost_FOUND)

message(STATUS "boost headers : ${Boost_INCLUDE_DIR}")
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
##
##
##


message(STATUS "CMake generates " ${CMAKE_GENERATOR})

include_directories(include)

#add_subdirectory( ./3dparty ./../lib )
add_subdirectory( ./fftpp )
add_subdirectory( ./pcm2freq )
#add_subdirectory( ./DShow ./lib )
add_subdirectory( ./GStreamer ./lib )
#add_subdirectory( ./examples ./bin )
